package com.yanqu.road.logic.bussiness.activity;

import com.yanqu.road.entity.activity.gashapon.config.GashaponReward;
import com.yanqu.road.entity.activity.gashapon.data.GashaponNotice;
import com.yanqu.road.entity.activity.gashapon.data.GashaponUserData;
import com.yanqu.road.logic.bussiness.DaoHelper;

import java.util.List;
import java.util.Map;

/**
 * @Author : Cxp
 * @Time : 2024-10-21
 * @Description : 幸运扭蛋-业务类
 */

public class GashaponBusiness {
    public static List<GashaponNotice> getNoticeDataList(int activityId) {
        return DaoHelper.getGashaponNoticeDaoImpl().getGashaponNoticeData(activityId);
    }

    public static boolean addNoticeDataList(List<GashaponNotice> list) {
        return DaoHelper.getGashaponNoticeDaoImpl().addNoticeList(list);
    }

    public static Map<Integer, GashaponReward> getRewardConfig(int activityId) {
        return DaoHelper.getGashaponConfigDaoImpl().getRewardConfig(activityId);
    }

    public GashaponUserData getGashaponUserData(int activityId, long userId) {
        return DaoHelper.getGashaponUserDataDaoImpl().getGashaponUserData(activityId, userId);
    }

    public boolean addUserData(GashaponUserData userData) {
        return DaoHelper.getGashaponUserDataDaoImpl().add(userData);
    }

    public boolean updateUserData(GashaponUserData userData) {
        return DaoHelper.getGashaponUserDataDaoImpl().update(userData);
    }
}
